<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class day0925 extends Controller
{
    public function add(Request $request){
        $data['name']=$request->input("name");
        $data['jiage']=$request->input("jiage");
        $data['shuliang']=$request->input("shuliang");
        if ($data['name']!=floatValue()){
            return "商品名只能为3~20";
        }
        if ($data['jiage']!=floatValue()){
            return "价格只能为浮点类型";
        }
        if ($data['shuliang']!=floatValue()){
            return "数量必须为整形";
        }
    }
}
